'''
Created on Nov 30, 2010

@author: oabalbin
'''

def write_pbs_header(qsubfile, jname, nnodes, ppn, wt):
    
    qsubfile.write('#!/bin/sh\n')
    qsubfile.write('#PBS -S /bin/sh\n')
    qsubfile.write('#PBS -N '+str(jname)+'\n')
    qsubfile.write('#PBS -l '+'nodes='+str(nnodes)+':ppn='+str(ppn)+',walltime='+wt+'\n')
    qsubfile.write('#PBS -q flux\n')
    qsubfile.write('#PBS -M oabalbin@umich.edu\n')
    qsubfile.write('#PBS -m abe\n')
    qsubfile.write('#PBS -V\n')
    qsubfile.write('#PBS -l qos=arul_flux\n')
    qsubfile.write('#PBS -A arul_flux\n')
    qsubfile.write('# \n')
    qsubfile.write('cat $PBS_NODEFILE \n')